<template>
  <custom-layout :isTabBar="false" navTitle="角色详情">
    <view class="details">
      <uni-list class="user-info">
        <uni-list-item v-for="item in items" :key="item.key" :title="item.label" :rightText="data[item.key]" />
      </uni-list>
    </view>
  </custom-layout>
</template>

<script>
import { getRoleDetail } from "@/api/system/role";
export default {
  data() {
    return {
      items: [
        { key: "roleName", label: "角色名称", icon: "" },
        { key: "roleKey", label: "权限标识", icon: "" },
        { key: "statusName", label: "状态名称", icon: "" },
        { key: "createTime", label: "创建时间", icon: "" },
        { key: "updateTime", label: "更新时间", icon: "" },
      ],
      data: {},
    };
  },
  onLoad(options) {
    getRoleDetail(options.id).then((res) => {
      this.data = res;
    });
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.details {
  width: 100%;
}
</style>
